package com.sxhuayuan.parking.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sxhuayuan.parking.dao.BaseDao;
import com.sxhuayuan.parking.dao.RoleDao;
import com.sxhuayuan.parking.entity.Role;
import com.sxhuayuan.parking.service.RoleService;

import java.util.List;

@Service("roleServiceImpl")
public class RoleServiceImpl extends BaseServiceImpl<Role, Long> implements RoleService {

	@Autowired
	RoleDao roleDao;

	@Override
	public BaseDao<Role, Long> getDAO() {
		return roleDao;
	}

	@Override
	public List<Role> findByType(Role.Type type) {
		return roleDao.findRolesByType(type);
	}
}
